﻿
Module WikiExceptions

    Public Class WikiException
        Inherits Exception

        Sub New(Msg As String)
            MyBase.New(Msg)
        End Sub
    End Class

    Public Class WikiNoPageException
        Inherits WikiException

        Sub New(RequstedPage As String)
            MyBase.New(String.Format("No page named '{0}'.", RequstedPage))
        End Sub
    End Class

    Public Class WikiNoPageVersionException
        Inherits WikiException

        Sub New(RequstedPage As String, Version As Long)
            MyBase.New(String.Format("No such version of page '{0}': {1}", RequstedPage, Version))
        End Sub
    End Class

    Public Class WikiInvalidNameException
        Inherits WikiException

        Public Sub New(Message As String)
            MyBase.New(Message)
        End Sub
    End Class
End Module
